package com.sasis.dao.ibatis;

import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import com.sasis.dao.FuncListDAO;
import com.sasis.model.FuncList;

public class FuncListDAOImpl  extends BaseDaoiBATIS implements FuncListDAO {
	private SqlMapClientTemplate template = this.getSqlMapClientTemplate();
	public int insert(FuncList record){
		template.insert("funcList_insert",record);
		return 1;
	}

    public int updateByPrimaryKey(FuncList record){
    	
    	System.out.println("......FuncListDAOImpl_update......");
    	return template.update("funcList_updateByPrimaryKey",record);
    	 
    }
    
   public List select(){
	   //System.out.println("FuncListDAOImpl....");
	   return template.queryForList("funcList_select",null);
	  // FuncList funcList=new FuncList();
	   //ArrayList list = (ArrayList)template.queryForList("funcList_select",null);;
	   //return list;
	   
   }

    public FuncList selectByPrimaryKey(FuncList record){
    	
    	
    	if(template.queryForObject("funcList_selectByPrimaryKey",record)instanceof FuncList){
    		return (FuncList)template.queryForObject("funcList_selectByPrimaryKey",record);
    	}
    	return null;
    }

    public int deleteByPrimaryKey(FuncList key){
    	template.delete("funcList_deleteByPrimaryKey",key);
    	return 2;
    	
    }

	public List getRoles() {
		// TODO Auto-generated method stub
		return null;
	}
	
}
	

